#include "CheckCoverageAction.h"
#include <EventManager.h>
#include "..\Constants.h"
#include <utils\Log.h>

void CheckCoverageAction::update(float elapsed) {
	int coverage = m_Core->gutter().getCoverage();
	m_Core->hud().setCoverage(coverage);
	if ( m_Core->settings().coverageMode ) {
		if ( coverage >= m_Core->settings().coverage ) {
			LOG(logINFO) << "cm coverage " << coverage << " settings " <<m_Core->settings().coverage;
			//switchState(GAME_OVER);
			FIRE_EMPTY_EVENT(EVN_COVERAGE_DONE);
		}
	}
}